package org.spiderdesign.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.spiderdesign.core.model.SpiderFlowHistory;

@Mapper
public interface SpiderFlowHistoryMapper extends BaseMapper<SpiderFlowHistory> {

    /**
     * 插入历史版本记录
     */
    @Insert("INSERT INTO sp_flow_history (" +
            "id, spider_flow_id, xml_content, create_time, created_by, created_by_uid" +
            ") VALUES (" +
            "#{id}, #{spiderFlowId}, #{xmlContent}, #{createTime}, #{createdBy}, #{createdByUid}" +
            ")")
    void insertHistory(SpiderFlowHistory history);
}